package com.gobo.jinghuimall.cart.entiry.vo;

import java.math.BigDecimal;
import java.util.List;

public class CartItem {

    private Long skuId;
    private Boolean checked;
    private String title;
    private String defaultImg;
    private BigDecimal price;
    private List<String> attrs;
    private Integer count;
    private BigDecimal totalPrice;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDefaultImg() {
        return defaultImg;
    }

    public void setDefaultImg(String defaultImg) {
        this.defaultImg = defaultImg;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public List<String> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<String> attrs) {
        this.attrs = attrs;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    /**
     * 计算总价
     *
     * @return
     */
    public BigDecimal getTotalPrice() {
        BigDecimal price = getPrice();
        BigDecimal totalPrice = price.multiply(new BigDecimal(this.count));
        return totalPrice;
    }

}
